<template>
  <table v-show="list && list.length > 0" class="table table-bordered table-hover">
    <caption>买方问答列表</caption>
    <thead>
      <tr>
        <th class="col-xs-2">ID</th>
        <th class="col-xs-2">名称</th>
        <th class="col-xs-2">模块颜色</th>
        <th class="col-xs-2"></th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="it in list">
        <td>
          {{it.id}}
        </td>
        <td >
          {{it.name}}
        </td>
        <td><div :style="{ background: it.color, width: '100px', height: '100px' }">{{it.color}}</div></td>
        <td class="col-nowrap text-right">
          <button class="btn btn-sm btn-danger" @click="deleteItem(it.id)">删除</button>
        </td>
      </tr>
    </tbody>
  </table>
  <vue-pages :pages.sync="pages" :get-list="getList"></vue-pages>
  <vue-uploader v-ref:uploader></vue-uploader>
</template>
<style src="./item-list.css" scoped></style>
<script src="./item-list.js"></script>